/* Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/*
  <file> uls_lf_swprintf.h </file>
  <brief>
    An wide-uls_char_t string version of uls_lf_sprintf.c.
    This file is part of ULS, Unified Lexical Scheme.
  </brief>
  <author>
    Stanley J. Hong <babel96@gmail.com>, 2011.
  </author>
*/

#ifndef __ULS_SWPRINTF_H__
#define __ULS_SWPRINTF_H__

#include "uls_lf_sprintf.h"
#include <wchar.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef wchar_t uls_lf_word_t;

int fmtproc_ls(uls_lf_context_t* ctx, uls_lf_puts_t puts_proc);
int fmtproc_lc(uls_lf_context_t* ctx, uls_lf_puts_t puts_proc);

int uls_lf_vxwprintf(void *x_dat, uls_lf_t* uls_lf, void* g_dat, const uls_lf_word_t* fmt, va_list args);
int uls_lf_xwprintf(void* x_dat, uls_lf_t* uls_lf, void* g_dat, const uls_lf_word_t* fmt, ...);
int uls_lf_vzwprintf(uls_lf_t* uls_lf, uls_lf_csz_t* bb, void* g_dat, const uls_lf_word_t *fmt, va_list args);

int uls_lf_zwprintf_append(uls_lf_csz_t* bb, void* g_dat, const uls_lf_word_t *fmt, ...);
int uls_lf_zwprintf(uls_lf_csz_t* bb, void* g_dat, const uls_lf_word_t *fmt, ...);
int uls_lf_vsnwprintf_generic(uls_lf_t* uls_lf, void* x_dat, uls_lf_puts_t puts_proc,
	void* g_dat, const uls_lf_word_t* fmtstr, va_list args);

#ifdef __cplusplus
}
#endif

#endif
